subplot(3,2,1);
load c:\manoj\projects\eej-induction\sel_mjd_ett
[A,IA,IB ] = intersect(data(:,1), sel_mjd);
plot((CHAMP_scalar_curr(IA,3:end))')
hold
plot(mean(CHAMP_scalar_curr(IA,3:end),1),'r','LineWidth',3)
axis([0,60,-0.1,0.2])
title('ETT-HYB Number of data = 41')
subplot(3,2,2)
load c:\manoj\projects\eej-induction\sel_mjd_tir
[A,IA,IB ] = intersect(data(:,1), sel_mjd);
plot((CHAMP_scalar_curr(IA,3:end))')
hold;
plot(mean(CHAMP_scalar_curr(IA,3:end),1),'r','LineWidth',3)
title('TIR-ABG Number of data = 36')
axis([0,60,-0.1,0.2])
load c:\manoj\projects\eej-induction\sel_mjd_hua
[A,IA,IB ] = intersect(data(:,1), sel_mjd);
subplot(3,2,3)
plot((CHAMP_scalar_curr(IA,3:end))')
hold
plot(mean(CHAMP_scalar_curr(IA,3:end),1),'r','LineWidth',3)
title('HUA-FUQ Number of data = 41')
axis([0,60,-0.1,0.2])
subplot(3,2,4)
load c:\manoj\projects\eej-induction\sel_mjd_yap
[A,IA,IB ] = intersect(data(:,1), sel_mjd);
plot((CHAMP_scalar_curr(IA,3:end))')
hold;
plot(mean(CHAMP_scalar_curr(IA,3:end),1),'r','LineWidth',3)
axis([0,60,-0.1,0.2])
title('YAP-BIK Number of data = 41')
title('YAP-BIK Number of data = 23')
subplot(3,2,5)
load c:\manoj\projects\eej-induction\sel_mjd_aae.mat
[A,IA,IB ] = intersect(data(:,1), sel_mjd);
plot((CHAMP_scalar_curr(IA,3:end))')
hold
plot(mean(CHAMP_scalar_curr(IA,3:end),1),'r','LineWidth',3)
axis([0,60,-0.1,0.2])
title('AAE-QSB Number of data = 24')


obs_pairs = [2,3;4,1;5,6;19,20;9,14]; %Olde AAE data - ELT
xtime = 0.5:1:23.5;
ikk =5;
load c:\manoj\projects\eej-induction\sel_mjd_aae
eq_obs = obs_pairs(ikk,1);
sq_obs = obs_pairs(ikk,2);
data1  = [];    
data1(:,1) = OBS(eq_obs).mjd;
data1(:,2) = OBS(eq_obs).data - OBS(sq_obs).data;
data = reshape(data1(:,2),[24,1096]);
fday = reshape(data1(:,1),[24,1096]);
fday = floor(fday(1,:));
[A,IA,IB] = intersect(fday,floor(sel_mjd));
subplot(3,2,ikk);
k=(nanmean(data(:,IA)'));
k=circshift(k',round(OBS(eq_obs).long/15));
plot(xtime,k);
axis([0 24 -10 100]);
title(sprintf('%s-%s',OBS(obs_pairs(ikk,1)).code, OBS(obs_pairs(ikk,2)).code));

%--------------
profl = load('c:\manoj\projects\eej-induction\HL\EEJ_ETT.LAT');
eej_scale = interp1(profl(:,1),profl(:,2),0)./interp1(profl(:,1),profl(:,2),OBS(2).dip_lat)
OBS(2).eej_factor3 = eej_scale;
profl = load('c:\manoj\projects\eej-induction\HL\EEJ_TIR.LAT');
eej_scale = interp1(profl(:,1),profl(:,2),0)./interp1(profl(:,1),profl(:,2),OBS(4).dip_lat)
OBS(4).eej_factor3 = eej_scale;
profl = load('c:\manoj\projects\eej-induction\HL\EEJ_HUA.LAT');
eej_scale = interp1(profl(:,1),profl(:,2),0)./interp1(profl(:,1),profl(:,2),OBS(5).dip_lat)
OBS(5).eej_factor3 = eej_scale;
profl = load('c:\manoj\projects\eej-induction\HL\EEJ_YAP.LAT');
eej_scale = interp1(profl(:,1),profl(:,2),0)./interp1(profl(:,1),profl(:,2),OBS(19).dip_lat)
OBS(19).eej_factor3 = eej_scale;
profl = load('c:\manoj\projects\eej-induction\HL\EEJ_AAE.LAT');
eej_scale = interp1(profl(:,1),profl(:,2),0)./interp1(profl(:,1),profl(:,2),OBS(9).dip_lat)
OBS(9).eej_factor3 = eej_scale;
save c:\manoj\projects\eej\OBS_array.mat OBS 